<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>My Project: ModPerUsr.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">My Project
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_mod_per_usr_8c.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">ModPerUsr.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Modulo Percistencia <a class="el" href="struct_usuario.html" title="Essa e a estrutura que classifica o usario no contexto modulo de persistencia usuario variaveis...">Usuario</a>.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="_in_per_usr_8h_source.html">InPerUsr.h</a>&quot;</code><br/>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a2b85e78747538b5c39c977ab6f203401"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_mod_per_usr_8c.html#a2b85e78747538b5c39c977ab6f203401">FechaArqui_PU</a> (FILE *)</td></tr>
<tr class="memdesc:a2b85e78747538b5c39c977ab6f203401"><td class="mdescLeft">&#160;</td><td class="mdescRight">Responsavel por frechar o arquivo.  <a href="#a2b85e78747538b5c39c977ab6f203401"></a><br/></td></tr>
<tr class="memitem:a9fc2fdfc6a05c6013182484a1b826c91"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_mod_per_usr_8c.html#a9fc2fdfc6a05c6013182484a1b826c91">ValidaOperacao_PU</a> (int)</td></tr>
<tr class="memdesc:a9fc2fdfc6a05c6013182484a1b826c91"><td class="mdescLeft">&#160;</td><td class="mdescRight">Responsavel por validar uma op do vetor de bits.  <a href="#a9fc2fdfc6a05c6013182484a1b826c91"></a><br/></td></tr>
<tr class="memitem:a5637de9545c786e994c6659c5a801083"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_mod_per_usr_8c.html#a5637de9545c786e994c6659c5a801083">EncontraUsuario_PU</a> (FILE *, const char *)</td></tr>
<tr class="memdesc:a5637de9545c786e994c6659c5a801083"><td class="mdescLeft">&#160;</td><td class="mdescRight">Responsavel achar um usuario.  <a href="#a5637de9545c786e994c6659c5a801083"></a><br/></td></tr>
<tr class="memitem:aae734f1c0493414db671a62688b2ea24"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aae734f1c0493414db671a62688b2ea24"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>VerificaSenha_PU</b> (const char *CpfPass, const char *SenhaPass)</td></tr>
<tr class="memitem:a90187d46403f04c26f8f55e98ea7d63d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a90187d46403f04c26f8f55e98ea7d63d"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>BloqueiaUsuario_PU</b> (const char *CpfPass)</td></tr>
<tr class="memitem:ac0115d102c51582fb20ec963154b7219"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac0115d102c51582fb20ec963154b7219"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>LiberaUsuario_PU</b> (const char *CpfPass)</td></tr>
<tr class="memitem:a41307744e915d4a9d91256a4160597dd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a41307744e915d4a9d91256a4160597dd"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>PegaUser_PU</b> (const char *CpfPass, <a class="el" href="structusuario___m.html">User_PU</a> *DadosUsuar)</td></tr>
<tr class="memitem:a5b61274b7c997cb2cc89362fb5af54a1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5b61274b7c997cb2cc89362fb5af54a1"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>AtualizaUser_PU</b> (<a class="el" href="structusuario___m.html">User_PU</a> *DadosUsuar)</td></tr>
<tr class="memitem:adb1f46bb934f47132839f9a3c2360dc0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adb1f46bb934f47132839f9a3c2360dc0"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>DeletaUser_PU</b> (const char *CpfPass)</td></tr>
<tr class="memitem:a6f4d6c608560811b4061e76057bf79d5"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_mod_per_usr_8c.html#a6f4d6c608560811b4061e76057bf79d5">AddUsuario_PU</a> (<a class="el" href="structusuario___m.html">User_PU</a> *NovoUsuar)</td></tr>
<tr class="memdesc:a6f4d6c608560811b4061e76057bf79d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Responsavel por adionar um novo usuario ao Banco de Dados.  <a href="#a6f4d6c608560811b4061e76057bf79d5"></a><br/></td></tr>
<tr class="memitem:a0fe824fc582424ecc7279f93c58fb95e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0fe824fc582424ecc7279f93c58fb95e"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>AddAlbum_PU</b> (const char *CpfPass)</td></tr>
<tr class="memitem:a7c61b0c84cbc84c285ddf5fb19fffdad"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7c61b0c84cbc84c285ddf5fb19fffdad"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>RemoveAlbum_PU</b> (const char *CpfPass)</td></tr>
<tr class="memitem:a9bbf42e8d3b10472049564f935e1acff"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_mod_per_usr_8c.html#a9bbf42e8d3b10472049564f935e1acff">VerificaNumeroAlbuns_PU</a> (const char *CpfPass)</td></tr>
<tr class="memdesc:a9bbf42e8d3b10472049564f935e1acff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Responsavel por pegar usuario dado a cpf deste.  <a href="#a9bbf42e8d3b10472049564f935e1acff"></a><br/></td></tr>
<tr class="memitem:a224b9522e245590567f12278628157b3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a224b9522e245590567f12278628157b3"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>ListaBloqueados_PU</b> (<a class="el" href="structusuario___m.html">User_PU</a> *Usuar, int Pulo)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Modulo Percistencia <a class="el" href="struct_usuario.html" title="Essa e a estrutura que classifica o usario no contexto modulo de persistencia usuario variaveis...">Usuario</a>. </p>
<p>As responsabilidades do Modulo Percistencia <a class="el" href="struct_usuario.html" title="Essa e a estrutura que classifica o usario no contexto modulo de persistencia usuario variaveis...">Usuario</a> e de gericiar o arquivo responsavel por salvar os ususarios em um arquivo e gerenciar esses detro do arquivo.<br/>
</p>
<p>Arquivo : o Arquivo sera um arquivo de resgistros de tamanho fixo que tera as sequintes caracteristicas:<br/>
 |campo 1= 11 digitos|campo 2= 15 digitos|campo 3= 4 digitos|campo 4= 1 digito|campo 5= 1 digito|campo 6= 1 digito<br/>
</p>
<p>campo 1= chave primeria cpf<br/>
 campo 2= chave secundaria nome <br/>
 campo 3= senha<br/>
 campo 4= numero de tentativas erradas<br/>
 campo 5= numero de albums do usuario<br/>
 campo 6= <a class="el" href="struct_usuario.html" title="Essa e a estrutura que classifica o usario no contexto modulo de persistencia usuario variaveis...">Usuario</a> Bloqueado </p>
</div><hr/><h2>Function Documentation</h2>
<a class="anchor" id="a6f4d6c608560811b4061e76057bf79d5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int AddUsuario_PU </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structusuario___m.html">User_PU</a> *&#160;</td>
          <td class="paramname"><em>NovoUsuar</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Responsavel por adionar um novo usuario ao Banco de Dados. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">NovoUsuar</td><td>: uma struct que tem os dados do novo usuario. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Um int que funciona com "bool":<br/>
 0 = Sucesso.<br/>
 -1 = Erro de Arquivo.<br/>
 -2 = <a class="el" href="struct_usuario.html" title="Essa e a estrutura que classifica o usario no contexto modulo de persistencia usuario variaveis...">Usuario</a> ja existe.<br/>
 OT = Erro Vetor de Bits.<br/>
 </dd></dl>

</div>
</div>
<a class="anchor" id="a5637de9545c786e994c6659c5a801083"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int EncontraUsuario_PU </td>
          <td>(</td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>Arqui</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>CpfPass</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Responsavel achar um usuario. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">Arqui</td><td>: o arquivo onde vai procurar </td></tr>
    <tr><td class="paramname">CpfPass</td><td>: o cpf a se encontrar. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Um int que funciona com "bool":<br/>
 0 - Sucesso<br/>
 NG - nao econtrado </dd></dl>

</div>
</div>
<a class="anchor" id="a2b85e78747538b5c39c977ab6f203401"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int FechaArqui_PU </td>
          <td>(</td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>Arqui</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Responsavel por frechar o arquivo. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">Aruqi</td><td>: Arquivo a ser fecahdo </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Um int que funciona com "bool":<br/>
 0 - Sucesso<br/>
 </dd></dl>

</div>
</div>
<a class="anchor" id="a9fc2fdfc6a05c6013182484a1b826c91"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ValidaOperacao_PU </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>TipoErro</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Responsavel por validar uma op do vetor de bits. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">TipoErro</td><td>: o tipo de erro que veio do vet bits </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Um int que funciona com "bool":<br/>
 0 - Sucesso<br/>
 NG - Erro de Banco de Dados<br/>
 </dd></dl>

</div>
</div>
<a class="anchor" id="a9bbf42e8d3b10472049564f935e1acff"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int VerificaNumeroAlbuns_PU </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>CpfPass</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Responsavel por pegar usuario dado a cpf deste. </p>
<p>int VerificaNumeroAlbuns_PU (const char* CpfPass) </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">cpf_Pass</td><td>O cpf do usuario cujo o valor de albuns deve ser verificado. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Um int que vem com o numero de albums ja incrementado:<br/>
 PO = Numero de albuns verificado.<br/>
 -1 = Erro de Arquivo.<br/>
 -2 = <a class="el" href="struct_usuario.html" title="Essa e a estrutura que classifica o usario no contexto modulo de persistencia usuario variaveis...">Usuario</a> nao encontrado.<br/>
 </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="_mod_per_usr_8c.html">ModPerUsr.c</a></li>
    <li class="footer">Generated on Wed Jul 4 2012 11:44:30 for My Project by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.1.1 </li>
  </ul>
</div>
</body>
</html>
